﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExamDetail.ascx.cs" Inherits="Framework.Portal.Layouts.Admin.Components.BGTT.OnlineExam.ExamDetail" %>
<style>
.datepicker > .datepicker_inner_container > .datepicker_timelist {width: 5.2em;}
.raAnswer{margin-left:20px;}
.tblAnswer{border: 1px #ddd solid;width: 100%;background-color:#DFE6EF}
.tblAnswer .alt{background-color:#fff}
.postheader {width: 200px;}
</style>
    <div class="tabs">
        <div class="tabcontent">
            <table id="boxGeneral" border="0" cellpadding="0" cellspacing="1" class="content" width="100%">
                <tr>
                    <td colspan="2" class="header2" height="18">
                        <asp:Label ID="lblUpdateStatus" runat="server" Font-Bold="True" ForeColor="Blue"></asp:Label>
                    </td>
                    <td class="header2">Danh sách câu trả lời</td>
                </tr>
                
                <tr>
                    <td class="postheader" align="right">
                        Tiêu đề
                    </td>
                    <td class="post" align="left">
                        <asp:TextBox runat="server" ID="txtTitle" Width="200px"></asp:TextBox>
                    </td>
                    <td rowspan="9" style="width: 270px;" valign="top">
                        <table class="tblAnswer" cellspacing="0" cellpadding=0">
                            <tr>
                                <td>Câu 1:</td>
                                <td>
                                    <input class="raAnswer" type="radio" name="gr1" value="A" title="A">A
                                    <input class="raAnswer" type="radio" name="gr1" value="B" title="B">B
                                    <input class="raAnswer" type="radio" name="gr1" value="C" title="C">C
                                    <input class="raAnswer" type="radio" name="gr1" value="D" title="D">D
                                </td>
                            </tr>
                            <tr class="alt">
                                <td>Câu 1:</td>
                                <td>
                                    <input class="raAnswer" type="radio" name="gr1" value="A" title="A">A
                                    <input class="raAnswer" type="radio" name="gr1" value="B" title="B">B
                                    <input class="raAnswer" type="radio" name="gr1" value="C" title="C">C
                                    <input class="raAnswer" type="radio" name="gr1" value="D" title="D">D
                                </td>
                            </tr>
                            <tr>
                                <td>Câu 1:</td>
                                <td>
                                    <input class="raAnswer" type="radio" name="gr1" value="A" title="A">A
                                    <input class="raAnswer" type="radio" name="gr1" value="B" title="B">B
                                    <input class="raAnswer" type="radio" name="gr1" value="C" title="C">C
                                    <input class="raAnswer" type="radio" name="gr1" value="D" title="D">D
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                
                <tr>
                    <td class="postheader" align="right">
                        Thời gian bắt đầu thi
                    </td>
                    <td class="post" align="left">
                        <asp:TextBox runat="server" ID="txtStartDate" Width="200px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="postheader" align="right">
                        Thời gian kết thúc thi
                    </td>
                    <td class="post" align="left">
                        <asp:TextBox runat="server" ID="txtEndDate" Width="200px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="postheader" align="right">
                        Số lượng câu hỏi
                    </td>
                    <td class="post" align="left">
                        <asp:TextBox runat="server" ID="txtNumberQ" Width="50px" ></asp:TextBox>
                        <span id="errNumberQ" style="color: red;display:none;">Bạn phải nhập số, chữ không được chấp nhận !!!</span>
                    </td>
                </tr>
                <tr>
                    <td class="postheader" align="right">
                        Thời gian làm bài
                    </td>
                    <td class="post" align="left">
                        <asp:TextBox runat="server" ID="txtTimeToExam" Width="50px"></asp:TextBox> (phút)
                    </td>
                </tr>
                <tr>
                    <td class="postheader" align="right">
                        Hình đại diện
                    </td>
                    <td class="post" align="left">
                        <NS:FilePicker runat="server" FileType="jpg" PopupTitle="Up ảnh" PopupFilter="image"
                Width="265" ID="txtImage"></NS:FilePicker>
                    </td>
                </tr>
                <tr>
                    <td class="postheader" align="right">
                        File đề thi
                    </td>
                    <td class="post" align="left">
                        <NS:FilePicker runat="server" FileType="pdf" PopupTitle="Up đề thi" PopupFilter="pdf"
                Width="265" ID="txtPDF"></NS:FilePicker>
                    </td>
                </tr>
                <tr>
                    <td class="postheader" align="right" valign="top">
                        Mô tả đề thi
                    </td>
                    <td class="post" align="left">
                        <asp:TextBox ID="txtDescription" TextMode="MultiLine" Rows="5" runat="server" Width="440"></asp:TextBox>
                        <asp:TextBox ID="txtAnswerList" TextMode="MultiLine" Rows="5" runat="server" Width="440"></asp:TextBox>
                    </td>
                </tr>
                
                <tr>
                    <td class="postfooter" colspan="2" valign="middle" align="center">
                        <NS:Button LocalizedPage="ACTION" LocalizedTag="UPDATE"
                            ID="General_cmdUpdate" runat="server" CssClass="pbutton" 
                            Text="Cập nhật" Width="77px" />
                        <NS:Button LocalizedPage="ACTION" LocalizedTag="CREATE"
                            ID="General_cmdAddNew" runat="server" CssClass="pbutton" 
                            Text="Thêm mới" Width="77px" />
                        <NS:Button LocalizedPage="ACTION" LocalizedTag="DELETE"
                            ID="General_cmdDelete" runat="server" CssClass="pbutton" 
                            Text="Xóa" Width="77px" />
                        <NS:Button LocalizedPage="ACTION" LocalizedTag="RESET"
                            ID="General_cmdEmpty" runat="server" CssClass="pbutton" CausesValidation="False"
                             Text="Hủy" Width="77px" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
<script type="text/javascript">
    $("#<%= txtNumberQ.ClientID %>").keyup(function () {
        console.log("key press");
        var totalQ;
        totalQ = $(this).val();
        console.log(totalQ);
        if (totalQ > 0) {
            $('#errNumberQ').css('display', 'none');
            $(this).css('border', '1px solid #4C77B6');
            console.log("da go so");
        } else {
            $(this).css('border', '1px solid red');
            $('#errNumberQ').css('display', 'block');
        }
    });

    $(document).ready(function () {
        console.log("key press");
        $('#<%= txtStartDate.ClientID %>').appendDtpicker();
        $('#<%= txtEndDate.ClientID %>').appendDtpicker();
        
    });
</script>